<?php
class pfForm {

	private $id;
	private $name;

	private $elements = array();

	/**
	 * 
	 * @var pfCollection
	 */
	private $collection;

	/**
	 * Enter description here...
	 *
	 * @param string $name
	 */
	public function __construct($name, $id = null) {
		$this->name = $name;
		$this->id   = ($id !== null ? $id : $name);

		$this->pfCollection = new pfCollection;
	}

	/**
	 * Enter description here...
	 *
	 * @return string
	 */
	public function getName() {
		return $this->name;
	}

	/**
	 * 
	 * @param string $action
	 */
	public function setAction($action) {
		$this->action = $action;
	}

	public function setMethod($method) {
		$this->collection->setMethod($method);
	}

	public function addElement(pfElement $element) {
		$this->element[] = $element;
	}

}